package com.abbcc.models;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.abbcc.service.BaseService;
import com.abbcc.util.BeansFactory;

@Entity
@Table(name = "p_qx")
public class TdQx {
	private int qxId;
	private String qxName;
	private String qxAction;
	@Id 
	@Column(name="qx_id") 
	public int getQxId() {
		return qxId;
	}
	public void setQxId(int qxId) {
		this.qxId = qxId;
	}
	@Column(name="qx_name") 
	public String getQxName() {
		return qxName;
	}
	public void setQxName(String qxName) {
		this.qxName = qxName;
	}
	@Column(name="qx_action") 
	public String getQxAction() {
		return qxAction;
	}
	public void setQxAction(String qxAction) {
		this.qxAction = qxAction;
	}
	public String isCheck(int userId,String qxName){
		BaseService baseService = (BaseService)BeansFactory.get("baseService");
		TdUqx tu = new TdUqx();
		tu.setUserId(userId);
		tu.setQxName(qxName);
		List<TdUqx> list = baseService.findByExample(tu);
		if(list.isEmpty())
			return "";
		return "01";
	}
	
}
